//
//  PasswordAletView.m
//  RONGAO
//
//  Created by wei wang on 2017/4/1.
//  Copyright © 2017年 wei wang. All rights reserved.
//

#import "PasswordAletView.h"

@implementation PasswordAletView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        
    }
    return self;
}
- (void)awakeFromNib
{
    [super awakeFromNib];
    self.backgroundColor = [UIColor colorWithRed:167/255.0 green:163/255.0 blue:161/255.0 alpha:0.8f];

}

- (IBAction)makeTureEvent:(id)sender {
    
    NSLog(@"确认");
    if ([self.oldpwd.text length]>0) {
        if (self.pressSureBtn) {
            self.pressSureBtn(self.oldpwd.text,self.newpwd.text,self.checkpwd.text);
        }
    }else{
        [SVProgressHUD showErrorWithStatus:@"请输入密码"];
    }

}

- (IBAction)makeCancelEvent:(id)sender {
    
    NSLog(@"取消");
    [self endEditing:YES];
    
    
    if (self.pressCancelBtn) {
        self.pressCancelBtn();
    }

}


@end
